package Work03_Set.son01;

import java.util.HashSet;

public class Test {
    public static void main(String[] args) {
        Student s1=new Student("张三","男",20);
        Student s2=new Student("李四","女",21);
        Student s3=new Student("张三","男",20);
        HashSet<Student> hashSet=new HashSet<>();
        hashSet.add(s1); hashSet.add(s2); hashSet.add(s3);
        for (Student student : hashSet) {
            System.out.println(student);
        }
    }
}
